Tag Link | [File->SetMode] | Category | File |
---|---|---|---|
Type | Member | Source Available | Yes |
Support | Preferred | Version | 7.0 |
Change | Unchanged | Data Source | Any |
Output Type | None | Security | File |
Implementation | LCAPI | Sets | Lasso 8.5, Lasso 8.0, Lasso 7.0 |
Sets the file read mode for the connection. This can be File_ModeLine for reading a file line by line, or File_ModeChar for reading a file character by character. Defaults to File_ModeChar if not specified.
[File Variable->(SetMode: Read Mode)]
Required Parameters | |
---|---|
Read Mode | This can be File_ModeLine for reading a file line by line, or File_ModeChar for reading a file character by character. Defaults to File_ModeChar if not specified. |
To reset the read mode during file operations:
Use the [File->SetMode] tag to change the read mode. The example below starts in File_ModeLine mode, reads the first line of myfile.txt, moves to line five, changes to File_ModeChar mode, and then reads the next 16 characters.
[Var:'File'=(File: 'myfile.txt', File_OpenRead, File_ModeLine)]
[$File->(Read: 1)]
[$File->(SetPosition: 5)]
[$File->(SetMode: File_ModeChar)]
[$File->(Read: 16)]
[$File->Close]
Substitution | ||
---|---|---|
|
|
|